x is a Date value or a DateTime value.
Whole Number (the day of the month)
Day extracts the day from a Date or DateTime value and returns a whole number.
Use any time you need only the day component of a Date or DateTime value. For example, if you are tracking payments that fall within a given month, you are interested only in the day they arrive; month and year information would be redundant. Also, if you need to use the day of the month in a numeric calculation (example: Day({file.OCTPMT}) - Day ({file.SEPPMT})), use the Day function to extract the day of the month and convert it to a Number.
The following examples are applicable to Crystal syntax:
Returns 10 where the last invoice date was the 10th day of the month.
If Day({file.LAST PAYMENT}) < 15 Then
If the day of the last payment was less than 15, print "Past Due", otherwise print nothing.
Day(CDateTime(1996, 3, 3, 10, 33, 20))
This function is designed to work like the Visual Basic function of the same name.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |